#ifndef __DMX512_H
#define __DMX512_H

#include "mcu_cfg.h"

extern	u8		rec_buf[64];
extern	u8		cmd_buf[64];
extern	u8		send_buf[64];

extern	u8		dmx_state;
extern	u8		time_out;
extern	u8		dmx_rec_end,dmx_rec_mode,data_mode;
extern	u8		rec_ok,cmd_ok,cmd_ucsaddr_ok,ucs_addr_cnt;
extern	u16		frame_num, frame_min, frame_max;
extern	u16		frame_ucsaddr_min, frame_ucsaddr_max;
extern	u8		ack_length, waddr_ok_flag;
extern	u8		waddr_ok_flag;

//extern void UART1_SEND_ISR(void);
//extern void UART1_Rec(void);

extern void DMX_Start(void);
extern void analyze_dmx_rec(void);
extern void Ack_Frame_Send(void);

void WaitBreakStartMode(void);
void SendDataMode(void);

void analyze_command(void);
void Cmd_Save_Min(void);
void Cmd_Save_Num(void);
void Cmd_Del_Min(void);
void Cmd_Save_Init_Light(void);
void Cmd_Save_Current(void);
void Cmd_Read_Current(void);
void Cmd_Pwm_Config(void);
void Cmd_Read_State(void);
void Cmd_Read_Config(void);
void Cmd_Realtime_dis(void);

void ucsaddr_proc(void);
u16	 ucsaddr_calc(u8 a_h, u8 a_l);
void waddr_ok_dis(void);

#endif

/*
void WaitBreakEndMode(void);
void ReceiveDataMode(void);

void analyze_standard_data(void);
void analyze_expand_rw(void);
void comm_err_report(void);
void comm_read_data(void);
void comm_write_data(void);
void analyze_addr_config(void);
void SET_Cmd_Proc(void);
void Cmd_Save_Addr(void);
void Cmd_Open_Addr(void);
void Cmd_Close_Addr(void);
void Cmd_Write_ID(void);
void Cmd_Read_ID(void);
void Cmd_Del_Addr(void);
void Cmd_Del_Num(void);
void Cmd_Save_Current(void);
void Cmd_Realtime_dis(void);
void Cmd_Read_Product(void);
*/
